package com.bfly.mall.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bfly.core.base.entity.BaseEntity;

import java.io.Serializable;
import java.util.List;

/**
 * 产品
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 21:23
 */
@TableName(value = "product", resultMap = "ProductResultMap")
public class Product extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 7279569423788951936L;

    /**
     * 产品名称
     */
    private String name;

    /**
     * 产品主图
     */
    private String cover;

    /**
     * 产品类目id
     */
    @TableField("category_id")
    private int categoryId;

    @TableField(exist = false)
    private ProductCategory category;

    /**
     * 运费模板Id
     */
    @TableField("freight_id")
    private int freightId;

    @TableField(exist = false)
    private FreightTemplate freightTemplate;

    /**
     * 单位
     */
    private String unit;

    /**
     * 是否上架
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/21 19:46
     */
    @TableField("is_on_shelf")
    private boolean onShelf;

    /**
     * 产品标签(推荐/热门/新品/精品 等)---参见数据字典 product_tag
     * @author 长沙商脉科技有限公司
     * @date 2020/11/2 17:16
     */
    @TableField("tag")
    private int tag;

    /**
     * 虚拟销量
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/23 14:45
     */
    @TableField("virtual_sales")
    private int virtualSales;

    /**
     * 实际销量
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/23 14:45
     */
    @TableField("actual_sales")
    private int actualSales;

    /**
     * 产品详情介绍
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/22 19:06
     */
    @TableField(exist = false)
    private ProductTxt txt;

    /**
     * 产品图片集合
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/22 19:16
     */
    @TableField(exist = false)
    private List<ProductImg> imgs;

    /**
     * 产品属性
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/22 19:50
     */
    @TableField(exist = false)
    private List<ProductAttr> attrs;

    /**
     * 产品多规格属性
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/22 20:24
     */
    @TableField(exist = false)
    private List<ProductSpeAttr> speAttrs;

    /**
     * 产品SKU
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/22 21:21
     */
    @TableField(exist = false)
    private List<ProductSku> skus;

    @TableField("is_deleted")
    private boolean deleted;

    @TableField("seq")
    private int seq;

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public FreightTemplate getFreightTemplate() {
        return freightTemplate;
    }

    public void setFreightTemplate(FreightTemplate freightTemplate) {
        this.freightTemplate = freightTemplate;
    }

    public int getVirtualSales() {
        return virtualSales;
    }

    public void setVirtualSales(int virtualSales) {
        this.virtualSales = virtualSales;
    }

    public int getActualSales() {
        return actualSales;
    }

    public void setActualSales(int actualSales) {
        this.actualSales = actualSales;
    }

    public List<ProductSku> getSkus() {
        return skus;
    }

    public void setSkus(List<ProductSku> skus) {
        this.skus = skus;
    }

    public List<ProductSpeAttr> getSpeAttrs() {
        return speAttrs;
    }

    public void setSpeAttrs(List<ProductSpeAttr> speAttrs) {
        this.speAttrs = speAttrs;
    }

    public List<ProductAttr> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<ProductAttr> attrs) {
        this.attrs = attrs;
    }

    public List<ProductImg> getImgs() {
        return imgs;
    }

    public void setImgs(List<ProductImg> imgs) {
        this.imgs = imgs;
    }

    public ProductTxt getTxt() {
        return txt;
    }

    public void setTxt(ProductTxt txt) {
        this.txt = txt;
    }

    public ProductCategory getCategory() {
        return category;
    }

    public void setCategory(ProductCategory category) {
        this.category = category;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    public int getFreightId() {
        return freightId;
    }

    public void setFreightId(int freightId) {
        this.freightId = freightId;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public boolean isOnShelf() {
        return onShelf;
    }

    public void setOnShelf(boolean onShelf) {
        this.onShelf = onShelf;
    }
}
